package com.lb.jwitter;
import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import org.hibernate.annotations.ForeignKey;

@Entity
@Table (name="tbl_dkmh_dotdk_hocvien")
public class Tbl_DKMH_DotDK_HocVien implements Serializable {
   private static final long serialVersionUID = -1989579066723007050L;

   private Long id;
   private Tbl_DKMH_DotDK dotDKId = null;
   private Tbl_ThongTin_HocVien hocVienId = null;
   private Integer soTCDangKyToiDa;
   private Boolean khongDangKyYN;
   private String khongDangKyLyDo;
   private Tbl_CanBo canBoId = null;
   private Date ngayCapNhat;

   public Tbl_DKMH_DotDK_HocVien(Long id){
	   super();
	   this.id = id;
   }

   public Tbl_DKMH_DotDK_HocVien(){
	   super();

   }
   
   @Id
   @GeneratedValue
   public Long getId() {
	    return id;
   }
   public void setId(Long id) {
	    this.id= id;
   }

   @ManyToOne(fetch=FetchType.EAGER)
   @JoinColumn(name="DotDKId")
   @ForeignKey(name="FK_tbl_DKMH_DotDK_tbl_DKMH_DotDK_HocVien")
   public Tbl_DKMH_DotDK getDotDKId() {
	    return dotDKId;
   }
   public void setDotDKId(Tbl_DKMH_DotDK dotDKId) {
	    this.dotDKId=dotDKId;
   }

   @ManyToOne(fetch=FetchType.EAGER)
   @JoinColumn(name="HocVienId")
   @ForeignKey(name="FK_tbl_ThongTin_HocVien_tbl_DKMH_DotDK_HocVien")
   public Tbl_ThongTin_HocVien getHocVienId() {
	    return hocVienId;
   }
   public void setHocVienId(Tbl_ThongTin_HocVien hocVienId) {
	    this.hocVienId=hocVienId;
   }

   public Integer getSoTCDangKyToiDa() {
   	return soTCDangKyToiDa;
   }
   public void setSoTCDangKyToiDa(Integer soTCDangKyToiDa) {
   	this.soTCDangKyToiDa= soTCDangKyToiDa;
   }

   public Boolean getKhongDangKyYN() {
   	return khongDangKyYN;
   }
   public void setKhongDangKyYN(Boolean khongDangKyYN) {
   	this.khongDangKyYN= khongDangKyYN;
   }

   public String getKhongDangKyLyDo() {
   	return khongDangKyLyDo;
   }
   public void setKhongDangKyLyDo(String khongDangKyLyDo) {
   	this.khongDangKyLyDo= khongDangKyLyDo;
   }

   @ManyToOne(fetch=FetchType.EAGER)
   @JoinColumn(name="CanBoId")
   @ForeignKey(name="FK_tbl_CanBo_tbl_DKMH_DotDK_HocVien")
   public Tbl_CanBo getCanBoId() {
	    return canBoId;
   }
   public void setCanBoId(Tbl_CanBo canBoId) {
	    this.canBoId=canBoId;
   }

   public Date getNgayCapNhat() {
   	return ngayCapNhat;
   }
   public void setNgayCapNhat(Date ngayCapNhat) {
   	this.ngayCapNhat= ngayCapNhat;
   }
}//endClass 

